package com.example.demo1101.demo1;

public class TestDaemon {
    public static void main(String[] args) {
        DaemonDemo daemonDemo = new DaemonDemo();
        daemonDemo.setDaemon(true);
        daemonDemo.start();

        DaemonDemo daemonDemo1 = new DaemonDemo();
        daemonDemo1.start();


        for (int i = 0; i < 0; i++) {
            System.out.println("main====" + i);
        }

    }
}

class DaemonDemo extends Thread {
    @Override
    public void run() {

        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName() + "=" + i);
        }

    }

}
